(function() {
	var Privacy = /*@__PURE__*/ (function(Component) {
		function Privacy(props) {
			Component.call(this, props);
			this.data = {
				title: "隐私保护提示",
				content:
					"1. 我们会遵循隐私政策收集、使用信息，但不会仅因同意本隐私政策而采取强制捆绑的方式收集信息。\n2. 为实现信息分享等目的所必需，我们可能会调用第三方SDK并获取与功能相关的最小必要信息（设备信息等)。\n3. GPS、摄像头、麦克风、相册权限均不会默认开启，只有经过明示授权才会在为实现功能或服务时使用，不会在功能或服务不需要时而通过你授权的权限收集信息。",
				nodes:
					'<div style="line-height:20px;font-size:14px;">您可以查看完整版<a href="widget://pages/privacypolicy.html" style="color:#6487df;text-decoration:none;">《隐私协议》</a>、<a href="widget://pages/userpolicy.html" style="color:#6487df;text-decoration:none;">《用户协议》</a></div>',
				disagree: "不同意",
				agree: "同意",
				isTipMode: false
			};
		}

		if (Component) Privacy.__proto__ = Component;
		Privacy.prototype = Object.create(Component && Component.prototype);
		Privacy.prototype.constructor = Privacy;
		Privacy.prototype.apiready = function() {};
		Privacy.prototype.disagree = function() {
			if (this.data.isTipMode) {
				api.closeWidget({silent: true});
			} else {
				this.data.title = "温馨提示";
				this.data.content =
					"您的信息仅用于为您提供服务，我们坚决保障您的隐私信息安全。如果您仍不同意本隐私协议，很遗憾我们将无法继续为您提供服务。";
				this.data.disagree = "不同意并退出";
				this.data.agree = "同意并继续";
				this.data.isTipMode = true;
			}
		};
		Privacy.prototype.agree = function() {
			api.agreedPrivacy();
			$api.setStorage("indexXY", 1);
		};
		Privacy.prototype.onInteract = function(e) {
			var url = e.detail.url;
			console.log(url);

			api.openWin({
				name: "privacy",
				url: url
			});

			// api.agreedPrivacy();
		};
		Privacy.prototype.render = function() {
			var this$1 = this;
			return apivm.h(
				"view",
				{class: "page"},
				apivm.h(
					"view",
					{class: "cover"},
					apivm.h(
						"view",
						{class: "box"},
						apivm.h("text", {class: "title"}, this.data.title),
						apivm.h(
							"scroll-view",
							{class: "content-area", bounces: false},
							apivm.h("text", {class: "content"}, this.data.content),
							apivm.h("rich-text", {
								class: "policy-area",
								nodes: this.data.nodes,
								"link-text-color": "#6487df",
								"user-select": true,
								oninteract: this.onInteract
							})
						),
						apivm.h(
							"view",
							{class: "btn-area"},
							apivm.h(
								"text",
								{
									class: "disagree",
									onclick: function(event) {
										if (this$1.disagree) {
											this$1.disagree();
										} else {
											disagree();
										}
									}
								},
								this.data.disagree
							),
							apivm.h("view", {class: "line"}),
							apivm.h(
								"text",
								{
									class: "agree",
									onclick: function(event) {
										if (this$1.agree) {
											this$1.agree();
										} else {
											agree();
										}
									}
								},
								this.data.agree
							)
						)
					)
				)
			);
		};

		return Privacy;
	})(Component);
	Privacy.css = {
		".page": {width: "100%", height: "100%"},
		".cover": {
			justifyContent: "center",
			alignItems: "center",
			width: "100%",
			height: "100%",
			backgroundColor: "rgba(0, 0, 0, 0.6)"
		},
		".box": {
			width: "85%",
			maxWidth: "360px",
			minHeight: "167px",
			maxHeight: "480px",
			backgroundColor: "white",
			borderRadius: "14px"
		},
		".title": {
			margin: "10px 15px",
			color: "black",
			fontWeight: "600",
			textAlign: "center",
			whiteSpace: "normal"
		},
		".content-area": {minHeight: "90px", maxHeight: "400px", overflow: "scroll"},
		".content": {
			margin: "0 15px",
			color: "black",
			fontSize: "14px",
			whiteSpace: "normal"
		},
		".policy-area": {margin: "10px 15px", whiteSpace: "normal"},
		".btn-area": {
			flexDirection: "row",
			alignItems: "center",
			height: "40px",
			borderTop: "0.5px solid #f5f5f5"
		},
		".disagree": {
			flex: "1",
			textAlign: "center",
			lineHeight: "40px",
			color: "#555"
		},
		".disagree:active": {opacity: "0.8"},
		".line": {width: "0.5px", height: "28px", backgroundColor: "#f5f5f5"},
		".agree": {
			flex: "1",
			textAlign: "center",
			lineHeight: "40px",
			color: "#EE2233"
		},
		".agree:active": {opacity: "0.8"}
	};
	apivm.define("privacy", Privacy);
	apivm.render(apivm.h("privacy", null), "body");
})();
